package com.ybkj.o2o.zhuanche.mapper;

import com.ybkj.o2o.zhuanche.common.query.CarTypeQuery;
import com.ybkj.o2o.zhuanche.entity.ServiceType;
import com.ybkj.o2o.zhuanche.entity.ServiceTypeCriteria;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.session.RowBounds;

import java.util.List;

public interface ServiceTypeMapper extends BaseMapper<ServiceType, ServiceTypeCriteria, Long> {
  Long countByExample(ServiceTypeCriteria example);

  int deleteByExample(ServiceTypeCriteria example);

  int deleteByPrimaryKey(Long id);

  int insert(ServiceType record);

  int insertSelective(ServiceType record);

  List<ServiceType> selectByExampleWithRowbounds(ServiceTypeCriteria example, RowBounds rowBounds);

  List<ServiceType> selectByExample(ServiceTypeCriteria example);

  ServiceType selectByPrimaryKey(Long id);

  int updateByExampleSelective(@Param("record") ServiceType record,
      @Param("example") ServiceTypeCriteria example);

  int updateByExample(@Param("record") ServiceType record,
      @Param("example") ServiceTypeCriteria example);

  int updateByPrimaryKeySelective(ServiceType record);

  int updateByPrimaryKey(ServiceType record);

  
  List<ServiceType> findByCarTypeCompanyId(
      @Param("carTypeCompanyId")Long carTypeCompanyId, @Param("appKey")String appKey);

  ServiceType findByServiceTypeId(
      @Param("serviceTypeId")Long serviceTypeId, @Param("appKey")String appKey);

  ServiceType findByCarTypeCompanyIdAndServiceType(@Param("carTypeCompanyId")Long carTypeCompanyId,
      @Param("serviceType")String serviceType, @Param("appKey")String appKey);

  ServiceType queryServiceType(CarTypeQuery carTypeQuery);

  Long deleteByCarTypeId(@Param("carTypeId")Long carTypeId, @Param("appKey")String appKey);

  List<ServiceType> findByCarTypeId(
      @Param("carTypeId")Long carTypeId, @Param("appKey")String appKey);

  int deleteById(@Param("id")Long id, @Param("appKey")String appKey);

  List<ServiceType> findByServiceType(
      @Param("serviceType")String serviceType, @Param("appKey")String appKey);

  List<ServiceType> findByCarTypeIdAndCarTypeCompanyId(@Param("carTypeId")Long carTypeId,
      @Param("carTypeCompanyId")Long carTypeCompanyId, @Param("appKey")String appKey);

  ServiceType findByNameAndCarTypeId(
      @Param("carTypeId")Long carTypeId, @Param("companyId")Long companyId,
      @Param("name")String name, @Param("appKey")String appKey);

}
